package com.android.fragmentdemo.adapters
import com.android.fragmentdemo.databinding.RvDynamicLayout01Binding
import com.android.fragmentdemo.databinding.RvFooterLayoutBinding
import com.android.fragmentdemo.databinding.RvHeaderLayoutBinding
import com.hengfoxwolf.commonbase.base.adapter.BaseRvWithFooterAdapter

class FooterBodyRVAdapter(footContent: String) :
    BaseRvWithFooterAdapter<String, RvFooterLayoutBinding, RvDynamicLayout01Binding>(
        RvFooterLayoutBinding::inflate,
        RvDynamicLayout01Binding::inflate
    ) {

    private val mFooterContent = footContent

    override fun bindFooterData(holder: ViewHolder, position: Int) {
        (holder.binding as? RvFooterLayoutBinding)?.apply {
            itemFlagTv.text = mFooterContent
        }
    }

    override fun bindData(holder: ViewHolder, dataItem: String, position: Int) {
        (holder.binding as? RvDynamicLayout01Binding)?.apply {
            itemDy01.text = dataItem
        }
    }
}